<?php
    /**
    * Join-us
    * For Prayonline
    * 
    * @author: trungdt
    * @since: Feb 22, 2011
    * @version: 1.0
    * 
    * Change logs
    * Mar 6, 2011 - trungdt - when logged in, we dont show register time
    */
    if (!defined("EXPONENT")) exit("");

    if (exponent_users_isLoggedIn()){
        if (!defined('SYS_FORMS')) require_once(BASE.'subsystems/forms.php');
        exponent_forms_initialize();
        $form = new form();
        $form->meta('action',"save_pray_register");
        $form->meta('module',"praymodule");
        $form->register("fakefield","Đăng ký cầu nguyện",new prayonline_userform($user->id));
        $html=$form->toHTML();
        $template = new template('praymodule','_edit_pray_register');
        $template->assign('form_html',$html);
        $template->output();    
    }
    else
    {
        header("Location: /sign-up");
    }

?>
